Change in openvpn[master]: socket_util: Clean up conversion warnings in add_in6_addr
A message that is not in the archive (sent off-list or not yet received): gerrit.1756402061000.Id3b8719ee6b457ce2d85156b39e0cea771a97e74@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email
to review the following change.
Change subject: socket_util: Clean up conversion warnings in add_in6_addr
......................................................................
socket_util: Clean up conversion warnings in add_in6_addr
---
M src/openvpn/socket_util.c
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1161/1
src/openvpn/socket_util.c +3 -5
@@ -241,14 +241,12 @@struct in6_addr add_in6_addr (struct in6_addr base,uint32_t add) { -int i; - -for (i =15 ; i >=0 && add >0 ; i--) +for (int i =15 ; i >=0 && add >0 ; i--) { - registerint carry; + registeruint32_t carry; registeruint32_t h; - h = (unsigned char )base.s6_addr[i]; + h = base.s6_addr[i]; base.s6_addr[i] = (h + add) &UINT8_MAX ;/* using explicit carry for the 8-bit additions will catch
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74
Gerrit-Change-Number: 1161
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email )
Change subject: socket_util: Clean up conversion warnings in add_in6_addr
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74
Gerrit-Change-Number: 1161
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Sun, 31 Aug 2025 15:12:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v4 1/1 socket_util: Clean up conversion warnings in add_in6_addr
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1161
This mail reflects revision 4 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/socket_util.c +3 -5
@@ -241,14 +241,12 @@struct in6_addr add_in6_addr (struct in6_addr base,uint32_t add) { -int i; - -for (i =15 ; i >=0 && add >0 ; i--) +for (int i =15 ; i >=0 && add >0 ; i--) { - registerint carry; + registeruint32_t carry; registeruint32_t h; - h = (unsigned char )base.s6_addr[i]; + h = base.s6_addr[i]; base.s6_addr[i] = (h + add) &UINT8_MAX ;/* using explicit carry for the 8-bit additions will catch
[Openvpn-devel] [PATCH applied] Re: socket_util: Clean up conversion warnings in add_in6_addr
The patch itself is straight forward, but having a unit test for all the possible overflows is very welcome - "it will test itself, across all platforms". BB is all green, local test on Linux also passes.
Your patch has been applied to the master branch.
commit 84ef4848e7c7325759c67a1bfee231e13efe9f89
Author: Frank Lichtenheld Date: Sun Aug 31 17:12:52 2025 +0200
socket_util: Clean up conversion warnings in add_in6_addr
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32725.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#5) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: socket_util: Clean up conversion warnings in add_in6_addr
......................................................................
socket_util: Clean up conversion warnings in add_in6_addr
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32725.html
---
M src/openvpn/socket_util.c
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1161/5
src/openvpn/socket_util.c +3 -5
@@ -241,14 +241,12 @@struct in6_addr add_in6_addr (struct in6_addr base,uint32_t add) { -int i; - -for (i =15 ; i >=0 && add >0 ; i--) +for (int i =15 ; i >=0 && add >0 ; i--) { - registerint carry; + registeruint32_t carry; registeruint32_t h; - h = (unsigned char )base.s6_addr[i]; + h = base.s6_addr[i]; base.s6_addr[i] = (h + add) &UINT8_MAX ;/* using explicit carry for the 8-bit additions will catch
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74
Gerrit-Change-Number: 1161
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email )
Change subject: socket_util: Clean up conversion warnings in add_in6_addr
......................................................................
socket_util: Clean up conversion warnings in add_in6_addr
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32725.html
---
M src/openvpn/socket_util.c
1 file changed, 3 insertions(+), 5 deletions(-)
src/openvpn/socket_util.c +3 -5
@@ -241,14 +241,12 @@struct in6_addr add_in6_addr (struct in6_addr base,uint32_t add) { -int i; - -for (i =15 ; i >=0 && add >0 ; i--) +for (int i =15 ; i >=0 && add >0 ; i--) { - registerint carry; + registeruint32_t carry; registeruint32_t h; - h = (unsigned char )base.s6_addr[i]; + h = base.s6_addr[i]; base.s6_addr[i] = (h + add) &UINT8_MAX ;/* using explicit carry for the 8-bit additions will catch
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74
Gerrit-Change-Number: 1161
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged